-- GENERATED SPELL FOR [Magical Horror] --


function spell0_16529(pUnit, Event) --@Arcane Volley,Self--
pUnit:FullCastSpellOnTarget(37078,pUnit)
pUnit:RegisterEvent('Sorts_16529', 1000, 1)
end

function spell1_16529(pUnit, Event) --@Power Distortion,Self--
pUnit:FullCastSpellOnTarget(29911,pUnit)
pUnit:RegisterEvent('Sorts_16529', 15316, 1)
end

function Sorts_16529(pUnit, Event)
local choix_sorts_16529 = math.random(0, 1)
if choix_sorts_16529 == 0 then
pUnit:RegisterEvent('spell0_16529', 1, 1)
end
if choix_sorts_16529 == 1 then
pUnit:RegisterEvent('spell1_16529', 1, 1)
end
end

function mob16529_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16529', math.random(1500, 3000), 1)
end

function mob16529_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16529_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16529_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16529, 1, 'mob16529_Action')
RegisterUnitEvent(16529, 2, 'mob16529_Leave')
RegisterUnitEvent(16529, 3, 'mob16529_Kill')
RegisterUnitEvent(16529, 4, 'mob16529_Die')
